<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 10:41
 */
$userName = $_POST['username'];
$password = $_POST['password'];



if($userName=='admin'&&$password=='888888'){
    echo'登入成功';
    echo'<br/>';

    $newup = md5($userName.$password);
//    echo $newup;
    setcookie('TAOKEN',$newup,time()+24*3600);
    if(isset($_COOKIE['TAOKEN'])){
        echo 'cookie 值是'.$_COOKIE['TAOKEN'];
        echo '<a href="touxiang.php">头像<a/>';
    }

}else {
    echo'账号或者密码错误';
}




